<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1>欢迎来访问</h1>
  <!-- <h2>
    <%=mons %>
  </h2>

  <%for(let i=0;i<5;i++){%>
    <h1>
      <%=i%>
    </h1>
    <%}%> -->
  <table border="1" width='500' align="center">
    <thead>
      <th>序号</th>
      <th>姓名</th>
      <th>年龄</th>
      <th>性别</th>
      <th>地址</th>
      <th>操作</th>
    </thead>
    <tbody>
      <%for(let item of mons){%>
        <tr>
          <td>
            <%=item.id%>
          </td>
          <td>
            <%=item.name%>
          </td>
          <td>
            <%=item.age%>
          </td>
          <td>
            <%=item.sex%>
          </td>
          <td>
            <%=item.address%>
          </td>
          <td>
            <a href="/del?id=<%=item.id%>">删除</a>
            <a href="/updata?id=<%=item.id%>">修改</a>
          </td>
        </tr>
        <%}%>
    </tbody>
  </table>

  <hr>
  <h1>新增</h1>
  <form action="/add-mons" method='post'>
    <div>
      姓名：<input type="text" name="name">
    </div>
    <div>
      年龄：<input type="text" name="age">
    </div>
    <div>
      性别：<input type="radio" name="sex" value="男">男
      <input type="radio" name="sex" value="女">女
      <input type="radio" name="sex" value="不男不女">不男不女
    </div>
    <div>
      地址：<input type="text" name="address">
    </div>
    <div>
      <input type="submit">
    </div>
  </form>
</body>

</html>